package Demo;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class Test2 {

    public static void main(String[] args) {
        BlockingQueue<Goods> blockingQueue=new ArrayBlockingQueue<>(5);
        Object o=new Object();

        ProducerQueue producerQueue=new ProducerQueue(blockingQueue);

        ConsumerQueue consumerQueue=new ConsumerQueue(blockingQueue);


        Thread thread=new Thread(producerQueue);
        Thread thread1=new Thread(consumerQueue);

        thread.start();
        thread1.start();
    }
}
